# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libkmahjongg
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/games"
pkgdesc="Common code, backgrounds and tile sets for games using Mahjongg tiles"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtsvg-dev kcoreaddons-dev kconfig-dev kconfigwidgets-dev kwidgetsaddons-dev kcompletion-dev ki18n-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/libkmahjongg-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"
options="!check" # No tests found

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="8ad55d17a0b6e06cf1abdec265abb55bcd5dd5aa80c2d9f9a3ef7331875d89c5a0dfb6bfad3e8e23d34ba7e6e5a20a6499ed0391f8c5ddd7e356aaee7dfd9010  libkmahjongg-20.04.3.tar.xz"
